
import request from '../../utils/request'


interface IData{
  saleOrganizationID:string
  enterShopID:string
  enterShopName:string
  outShopID:string
  outShopName:string
  allocateGoodsCreateDtoList:Array<any>
}
//新建调拨单保存（没有订单id时）
export  function transferSave(data:IData) {
  return request({
    url: '/sale/ShopAllocation/allocateCs',
    method: 'post',
    data
  })
}

//新建调拨单提交（没有订单id时）
export  function transferSubmit(data:IData) {
  return request({
    url: '/sale/ShopAllocation/submitCs',
    method: 'post',
    data
  })
}


interface IUpdate{
  id:string
  modifyTags:string // 0为保存  1为提交
  saleOrganizationID:string
  enterShopID:string
  enterShopName:string
  outShopID:string
  outShopName:string
  allocateGoodsCreateDtoList:Array<any>
}
//调拨单修改
export  function transferUpdate(data:IUpdate) {
  return request({
    url: '/sale/ShopAllocation/updateAllocateCs',
    method: 'post',
    data
  })
}


//删除调拨单
export  function delTransferOrder(saleOrganizationID:string,id:string) {
  return request({
    url: `/sale/ShopAllocation/deleteCs`,
    method: 'get',
    params:{saleOrganizationID,id}
  })
}
